import React from 'react'
import CKEditor from './CKEditor1'

// import './contents.css'

class Editor extends React.Component{
    constructor(props){
        super(props)
        this.state = {
            content: '',
        }
    }
    handleChange (val){
        this.setState({
            content:val,
        })
    }
    render(){
        return (
            <div>
                <div>
                    <div dangerouslySetInnerHTML={{__html: this.state.content}} />
                </div> 
                <CKEditor onChange={this.handleChange.bind(this)} />
            </div>
        )
    }
}

export default Editor